<?php
header('Content-Type:application/json;charset=utf-8');
$raw=file_get_contents('php://input');
$raw=json_decode($raw,true);
$id=$raw['id'];

if($id!=''){
   if(file_exists("科目/$id")){
        unlink("科目/$id");
        $arr=array('msg'=>'成功','content'=>'删除成功！');
        echo json_encode($arr,JSON_UNESCAPED_UNICODE);
    }else{
        $arr=array('msg'=>'失败','content'=>'该ID不存在！');
        echo json_encode($arr,JSON_UNESCAPED_UNICODE);
    } 
}else{
    $arr=array('msg'=>'失败','content'=>'参数不完整！');
    echo json_encode($arr,JSON_UNESCAPED_UNICODE);
}


